package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.AuthDto;
import com.heima.user.service.ApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
public class ApUserAuthenController {
    @Autowired
    ApUserRealnameService apUserRealnameService;
    @PostMapping("/list")
    public ResponseResult getList(@RequestBody AuthDto authDto) {
       return apUserRealnameService.getList(authDto);
    }

    @PostMapping("/authFail")
    public ResponseResult getFail(@RequestBody AuthDto authDto) {
       return apUserRealnameService.getStatus(authDto,2);
    }

    @PostMapping("/authPass")
    public ResponseResult getPass(@RequestBody AuthDto authDto) {
        return apUserRealnameService.getStatus(authDto,9);
    }
}
